package com.mijie.homi.service.chat;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mijie.homi.common.domain.chat.ChatMessage;
import com.mijie.homi.dao.chat.ChatMessageDao;

@Service
public class ChatService {

	@Autowired
	private ChatMessageDao chatMessageDao;
	
	public List<ChatMessage> listChatMessage(int userId){
		return chatMessageDao.listChatMessage(userId);
	}
	
	public int blockUser(int userId,int intruder){
		return chatMessageDao.blockUser(userId, intruder);
	}
	
	public int unblockUser(int userId,int intruder){
		return chatMessageDao.unblockUser(userId, intruder);
	}
	
}
